﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace GA.Server.Api
{
    [Serializable]
    public class ApiInfoSession : ApiCall
    {
        protected override string ApiCallName
        {
            get { return "setsession"; }
        }
        public string SessionId { get; private set; }

        public ApiInfoSession()
        {
        }

        public ApiInfoSession(int clientId, string authorizationCode)
            : base(clientId, authorizationCode)
        {
        }

        public void LoadApi()
        {
            LoadXmlDocument(null);
            XmlNodeList testList = XmlDocument.GetElementsByTagName("session_id");
            if (testList.Count > 0)
            {
                SessionId = testList[0].InnerText;
            }
        }
    }
}
